<template>
	<view class="repair xingxiang">
		<u-tabs name="cate_name" active-color="#0fb88d" count="cate_count" bar-width="100" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>

		<view class="add-round bg-deepBlue" :class="'bg-' + themeColor.name" @click="uploadImg">
			<text class="cuIcon-add text-xxl"></text>
		</view>
		
		<view class="imagesList">
			<u-image width="300rpx" height="300rpx" :src="src"></u-image>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
				current:0,
				imgArr:[],
				list: [{
									cate_name: '门头'
								}, {
									cate_name: '店内'
								}, {
									cate_name: '地柜',
				                   
								},{
									cate_name: '背柜',
				                   
								}],
			};
		},
		
		onShow() {
			this.initData();
		},
		methods: {
			uploadImg(){
							let that = this
							uni.chooseImage({
								success(res) {
									console.log(res.tempFilePaths)
									that.imgArr = res.tempFilePaths;
									console.log(that.imgArr)
									}
							})
						},
			// 数据初始化
			initData() {
				// uni.setNavigationBarColor({
				// 	frontColor: '#ffffff',
				// 	backgroundColor: this.themeColor.color,
				// 	animation: {
				// 		duration: 400,
				// 		timingFunc: 'easeIn'
				// 	}
				// })
			},
			
			navTo(route) {
				this.$mRouter.push({
					route
				});
			}
		}
	};
</script>

<style lang="scss">
	page {
		background-color: $page-color-base;
	}
	.imagesList{
		width:100%;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding: 5px;
	}
	.repair {

		.add-round {
			position: fixed;
			z-index: 999;
			right: 30rpx;
			bottom: 30rpx;
			border-radius: 50%;
			width: 120rpx;
			height: 120rpx;
			color: #fff;
			text-align: center;
			line-height: 120rpx;
			font-weight: 100;
			font-size: 80rpx;
		}

		.repair-list {
			margin-top: 20upx;

			.row {
				width: calc(94%);
				height: calc(22vw + 40upx);
				margin: 0 auto $spacing-base;
				border-radius: 15upx;
				box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.1);
				display: flex;
				align-items: center;
				position: relative;
				overflow: hidden;
				z-index: 4;
				border: 0;

				.carrier {
					@keyframes showMenu {
						0% {
							transform: translateX(0);
						}

						100% {
							transform: translateX(-30%);
						}
					}

					@keyframes closeMenu {
						0% {
							transform: translateX(-30%);
						}

						100% {
							transform: translateX(0);
						}
					}

					background-color: #fff;
					position: absolute;
					width: 100%;
					padding: 0 0;
					height: 100%;
					z-index: 3;
					display: flex;
					align-items: center;
				}
			}

			.repair-wrapper {
				background-color: $color-white;
				width: 100%;
				padding: $spacing-base $spacing-lg $spacing-base $spacing-lg;
				margin: $spacing-base 0 0;
				border-radius: 15upx;
				position: relative;

				.title {
					font-size: $font-lg;
					color: $font-color-dark;
					font-weight: 500;
					margin: 0 0 $spacing-sm;
				}

				.content {
					font-size: $font-sm;
					color: $font-color-base;
					height: 75upx;
					line-height: 36upx;
				}

				.time {
					font-size: $font-base;
					color: $font-color-light;
				}

			}
		}

	}
</style>
